let mongoose = require('./db')


let StudentSchema = new mongoose.Schema({
    name: String,
    path: String,
    sum: Number,
    num: String,
})
let StudenModel = mongoose.model('stus', StudentSchema, 'stus')
let login = new mongoose.Schema({
    name: String,
    password: String,
    meil: String,
}, { versionKey: false })
let loginModel = mongoose.model('login', login)
let CatetSchema = new mongoose.Schema({
    name: String,
    path: String,
    sum: Number,
    num: String,
})
let CateModel = mongoose.model('cate', CatetSchema, 'cate')

let ListSchema = new mongoose.Schema({
    img: String,
    name: String,
    time: {
        type: Date,
        default: Date.now // 将default的值设为Date.now这个函数，它会在每次创建文档时执行获取当前时间
    },
    symbol: String,
    price: Number,
});
let ListModel = mongoose.model('list', ListSchema, 'list')



module.exports = { StudenModel, loginModel, CateModel,ListModel } 